(function(t) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).io = t();
})(function() {
return function t(e, n, r) {
function o(s, a) {
if (!n[s]) {
if (!e[s]) {
var c = "function" == typeof require && require;
if (!a && c) return c(s, !0);
if (i) return i(s, !0);
var p = new Error("Cannot find module '" + s + "'");
throw p.code = "MODULE_NOT_FOUND", p;
}
var f = n[s] = {
exports: {}
};
e[s][0].call(f.exports, function(t) {
return o(e[s][1][t] || t);
}, f, f.exports, t, e, n, r);
}
return n[s].exports;
}
for (var i = "function" == typeof require && require, s = 0; s < r.length; s++) o(r[s]);
return o;
}({
1: [ function(t, e) {
e.exports = t("./lib/");
}, {
"./lib/": 2
} ],
2: [ function(t, e) {
e.exports = t("./socket");
e.exports.parser = t("engine.io-parser");
}, {
"./socket": 3,
"engine.io-parser": 19
} ],
3: [ function(t, e) {
(function(n) {
var r = t("./transports"), o = t("component-emitter"), i = t("debug")("engine.io-client:socket"), s = t("indexof"), a = t("engine.io-parser"), c = t("parseuri"), p = t("parsejson"), f = t("parseqs");
e.exports = u;
function u(t, e) {
if (!(this instanceof u)) return new u(t, e);
e = e || {};
if (t && "object" == typeof t) {
e = t;
t = null;
}
if (t) {
t = c(t);
e.hostname = t.host;
e.secure = "https" == t.protocol || "wss" == t.protocol;
e.port = t.port;
t.query && (e.query = t.query);
} else e.host && (e.hostname = c(e.host).host);
this.secure = null != e.secure ? e.secure : n.location && "https:" == location.protocol;
e.hostname && !e.port && (e.port = this.secure ? "443" : "80");
this.agent = e.agent || !1;
this.hostname = e.hostname || (n.location ? location.hostname : "localhost");
this.port = e.port || (n.location && location.port ? location.port : this.secure ? 443 : 80);
this.query = e.query || {};
"string" == typeof this.query && (this.query = f.decode(this.query));
this.upgrade = !1 !== e.upgrade;
this.path = (e.path || "/engine.io").replace(/\/$/, "") + "/";
this.forceJSONP = !!e.forceJSONP;
this.jsonp = !1 !== e.jsonp;
this.forceBase64 = !!e.forceBase64;
this.enablesXDR = !!e.enablesXDR;
this.timestampParam = e.timestampParam || "t";
this.timestampRequests = e.timestampRequests;
this.transports = e.transports || [ "polling", "websocket" ];
this.readyState = "";
this.writeBuffer = [];
this.policyPort = e.policyPort || 843;
this.rememberUpgrade = e.rememberUpgrade || !1;
this.binaryType = null;
this.onlyBinaryUpgrades = e.onlyBinaryUpgrades;
this.perMessageDeflate = !1 !== e.perMessageDeflate && (e.perMessageDeflate || {});
!0 === this.perMessageDeflate && (this.perMessageDeflate = {});
this.perMessageDeflate && null == this.perMessageDeflate.threshold && (this.perMessageDeflate.threshold = 1024);
this.pfx = e.pfx || null;
this.key = e.key || null;
this.passphrase = e.passphrase || null;
this.cert = e.cert || null;
this.ca = e.ca || null;
this.ciphers = e.ciphers || null;
this.rejectUnauthorized = void 0 === e.rejectUnauthorized ? null : e.rejectUnauthorized;
var r = "object" == typeof n && n;
r.global === r && e.extraHeaders && Object.keys(e.extraHeaders).length > 0 && (this.extraHeaders = e.extraHeaders);
this.open();
}
u.priorWebsocketSuccess = !1;
o(u.prototype);
u.protocol = a.protocol;
u.Socket = u;
u.Transport = t("./transport");
u.transports = t("./transports");
u.parser = t("engine.io-parser");
u.prototype.createTransport = function(t) {
i('creating transport "%s"', t);
var e = h(this.query);
e.EIO = a.protocol;
e.transport = t;
this.id && (e.sid = this.id);
return new r[t]({
agent: this.agent,
hostname: this.hostname,
port: this.port,
secure: this.secure,
path: this.path,
query: e,
forceJSONP: this.forceJSONP,
jsonp: this.jsonp,
forceBase64: this.forceBase64,
enablesXDR: this.enablesXDR,
timestampRequests: this.timestampRequests,
timestampParam: this.timestampParam,
policyPort: this.policyPort,
socket: this,
pfx: this.pfx,
key: this.key,
passphrase: this.passphrase,
cert: this.cert,
ca: this.ca,
ciphers: this.ciphers,
rejectUnauthorized: this.rejectUnauthorized,
perMessageDeflate: this.perMessageDeflate,
extraHeaders: this.extraHeaders
});
};
function h(t) {
var e = {};
for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
return e;
}
u.prototype.open = function() {
var t;
if (this.rememberUpgrade && u.priorWebsocketSuccess && -1 != this.transports.indexOf("websocket")) t = "websocket"; else {
if (0 === this.transports.length) {
var e = this;
setTimeout(function() {
e.emit("error", "No transports available");
}, 0);
return;
}
t = this.transports[0];
}
this.readyState = "opening";
try {
t = this.createTransport(t);
} catch (t) {
this.transports.shift();
this.open();
return;
}
t.open();
this.setTransport(t);
};
u.prototype.setTransport = function(t) {
i("setting transport %s", t.name);
var e = this;
if (this.transport) {
i("clearing existing transport %s", this.transport.name);
this.transport.removeAllListeners();
}
this.transport = t;
t.on("drain", function() {
e.onDrain();
}).on("packet", function(t) {
e.onPacket(t);
}).on("error", function(t) {
e.onError(t);
}).on("close", function() {
e.onClose("transport close");
});
};
u.prototype.probe = function(t) {
i('probing transport "%s"', t);
var e = this.createTransport(t, {
probe: 1
}), n = !1, r = this;
u.priorWebsocketSuccess = !1;
function o() {
if (r.onlyBinaryUpgrades) {
var o = !this.supportsBinary && r.transport.supportsBinary;
n = n || o;
}
if (!n) {
i('probe transport "%s" opened', t);
e.send([ {
type: "ping",
data: "probe"
} ]);
e.once("packet", function(o) {
if (!n) if ("pong" == o.type && "probe" == o.data) {
i('probe transport "%s" pong', t);
r.upgrading = !0;
r.emit("upgrading", e);
if (!e) return;
u.priorWebsocketSuccess = "websocket" == e.name;
i('pausing current transport "%s"', r.transport.name);
r.transport.pause(function() {
if (!n && "closed" != r.readyState) {
i("changing transport and sending upgrade packet");
h();
r.setTransport(e);
e.send([ {
type: "upgrade"
} ]);
r.emit("upgrade", e);
e = null;
r.upgrading = !1;
r.flush();
}
});
} else {
i('probe transport "%s" failed', t);
var s = new Error("probe error");
s.transport = e.name;
r.emit("upgradeError", s);
}
});
}
}
function s() {
if (!n) {
n = !0;
h();
e.close();
e = null;
}
}
function a(n) {
var o = new Error("probe error: " + n);
o.transport = e.name;
s();
i('probe transport "%s" failed because of error: %s', t, n);
r.emit("upgradeError", o);
}
function c() {
a("transport closed");
}
function p() {
a("socket closed");
}
function f(t) {
if (e && t.name != e.name) {
i('"%s" works - aborting "%s"', t.name, e.name);
s();
}
}
function h() {
e.removeListener("open", o);
e.removeListener("error", a);
e.removeListener("close", c);
r.removeListener("close", p);
r.removeListener("upgrading", f);
}
e.once("open", o);
e.once("error", a);
e.once("close", c);
this.once("close", p);
this.once("upgrading", f);
e.open();
};
u.prototype.onOpen = function() {
i("socket open");
this.readyState = "open";
u.priorWebsocketSuccess = "websocket" == this.transport.name;
this.emit("open");
this.flush();
if ("open" == this.readyState && this.upgrade && this.transport.pause) {
i("starting upgrade probes");
for (var t = 0, e = this.upgrades.length; t < e; t++) this.probe(this.upgrades[t]);
}
};
u.prototype.onPacket = function(t) {
if ("opening" == this.readyState || "open" == this.readyState) {
i('socket receive: type "%s", data "%s"', t.type, t.data);
this.emit("packet", t);
this.emit("heartbeat");
switch (t.type) {
case "open":
this.onHandshake(p(t.data));
break;

case "pong":
this.setPing();
this.emit("pong");
break;

case "error":
var e = new Error("server error");
e.code = t.data;
this.onError(e);
break;

case "message":
this.emit("data", t.data);
this.emit("message", t.data);
}
} else i('packet received with socket readyState "%s"', this.readyState);
};
u.prototype.onHandshake = function(t) {
this.emit("handshake", t);
this.id = t.sid;
this.transport.query.sid = t.sid;
this.upgrades = this.filterUpgrades(t.upgrades);
this.pingInterval = t.pingInterval;
this.pingTimeout = t.pingTimeout;
this.onOpen();
if ("closed" != this.readyState) {
this.setPing();
this.removeListener("heartbeat", this.onHeartbeat);
this.on("heartbeat", this.onHeartbeat);
}
};
u.prototype.onHeartbeat = function(t) {
clearTimeout(this.pingTimeoutTimer);
var e = this;
e.pingTimeoutTimer = setTimeout(function() {
"closed" != e.readyState && e.onClose("ping timeout");
}, t || e.pingInterval + e.pingTimeout);
};
u.prototype.setPing = function() {
var t = this;
clearTimeout(t.pingIntervalTimer);
t.pingIntervalTimer = setTimeout(function() {
i("writing ping packet - expecting pong within %sms", t.pingTimeout);
t.ping();
t.onHeartbeat(t.pingTimeout);
}, t.pingInterval);
};
u.prototype.ping = function() {
var t = this;
this.sendPacket("ping", function() {
t.emit("ping");
});
};
u.prototype.onDrain = function() {
this.writeBuffer.splice(0, this.prevBufferLen);
this.prevBufferLen = 0;
0 === this.writeBuffer.length ? this.emit("drain") : this.flush();
};
u.prototype.flush = function() {
if ("closed" != this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length) {
i("flushing %d packets in socket", this.writeBuffer.length);
this.transport.send(this.writeBuffer);
this.prevBufferLen = this.writeBuffer.length;
this.emit("flush");
}
};
u.prototype.write = u.prototype.send = function(t, e, n) {
this.sendPacket("message", t, e, n);
return this;
};
u.prototype.sendPacket = function(t, e, n, r) {
if ("function" == typeof e) {
r = e;
e = void 0;
}
if ("function" == typeof n) {
r = n;
n = null;
}
if ("closing" != this.readyState && "closed" != this.readyState) {
(n = n || {}).compress = !1 !== n.compress;
var o = {
type: t,
data: e,
options: n
};
this.emit("packetCreate", o);
this.writeBuffer.push(o);
r && this.once("flush", r);
this.flush();
}
};
u.prototype.close = function() {
if ("opening" == this.readyState || "open" == this.readyState) {
this.readyState = "closing";
var t = this;
this.writeBuffer.length ? this.once("drain", function() {
this.upgrading ? r() : e();
}) : this.upgrading ? r() : e();
}
function e() {
t.onClose("forced close");
i("socket closing - telling transport to close");
t.transport.close();
}
function n() {
t.removeListener("upgrade", n);
t.removeListener("upgradeError", n);
e();
}
function r() {
t.once("upgrade", n);
t.once("upgradeError", n);
}
return this;
};
u.prototype.onError = function(t) {
i("socket error %j", t);
u.priorWebsocketSuccess = !1;
this.emit("error", t);
this.onClose("transport error", t);
};
u.prototype.onClose = function(t, e) {
if ("opening" == this.readyState || "open" == this.readyState || "closing" == this.readyState) {
i('socket close with reason: "%s"', t);
clearTimeout(this.pingIntervalTimer);
clearTimeout(this.pingTimeoutTimer);
this.transport.removeAllListeners("close");
this.transport.close();
this.transport.removeAllListeners();
this.readyState = "closed";
this.id = null;
this.emit("close", t, e);
this.writeBuffer = [];
this.prevBufferLen = 0;
}
};
u.prototype.filterUpgrades = function(t) {
for (var e = [], n = 0, r = t.length; n < r; n++) ~s(this.transports, t[n]) && e.push(t[n]);
return e;
};
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {
"./transport": 4,
"./transports": 5,
"component-emitter": 15,
debug: 17,
"engine.io-parser": 19,
indexof: 23,
parsejson: 26,
parseqs: 27,
parseuri: 28
} ],
4: [ function(t, e) {
var n = t("engine.io-parser"), r = t("component-emitter");
e.exports = o;
function o(t) {
this.path = t.path;
this.hostname = t.hostname;
this.port = t.port;
this.secure = t.secure;
this.query = t.query;
this.timestampParam = t.timestampParam;
this.timestampRequests = t.timestampRequests;
this.readyState = "";
this.agent = t.agent || !1;
this.socket = t.socket;
this.enablesXDR = t.enablesXDR;
this.pfx = t.pfx;
this.key = t.key;
this.passphrase = t.passphrase;
this.cert = t.cert;
this.ca = t.ca;
this.ciphers = t.ciphers;
this.rejectUnauthorized = t.rejectUnauthorized;
this.extraHeaders = t.extraHeaders;
}
r(o.prototype);
o.prototype.onError = function(t, e) {
var n = new Error(t);
n.type = "TransportError";
n.description = e;
this.emit("error", n);
return this;
};
o.prototype.open = function() {
if ("closed" == this.readyState || "" == this.readyState) {
this.readyState = "opening";
this.doOpen();
}
return this;
};
o.prototype.close = function() {
if ("opening" == this.readyState || "open" == this.readyState) {
this.doClose();
this.onClose();
}
return this;
};
o.prototype.send = function(t) {
if ("open" != this.readyState) throw new Error("Transport not open");
this.write(t);
};
o.prototype.onOpen = function() {
this.readyState = "open";
this.writable = !0;
this.emit("open");
};
o.prototype.onData = function(t) {
var e = n.decodePacket(t, this.socket.binaryType);
this.onPacket(e);
};
o.prototype.onPacket = function(t) {
this.emit("packet", t);
};
o.prototype.onClose = function() {
this.readyState = "closed";
this.emit("close");
};
}, {
"component-emitter": 15,
"engine.io-parser": 19
} ],
5: [ function(t, e, n) {
(function(e) {
var r = t("xmlhttprequest-ssl"), o = t("./polling-xhr"), i = t("./polling-jsonp"), s = t("./websocket");
n.polling = function(t) {
var n = !1, s = !1, a = !1 !== t.jsonp;
if (e.location) {
var c = "https:" == location.protocol, p = location.port;
p || (p = c ? 443 : 80);
n = t.hostname != location.hostname || p != t.port;
s = t.secure != c;
}
t.xdomain = n;
t.xscheme = s;
if ("open" in new r(t) && !t.forceJSONP) return new o(t);
if (!a) throw new Error("JSONP disabled");
return new i(t);
};
n.websocket = s;
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {
"./polling-jsonp": 6,
"./polling-xhr": 7,
"./websocket": 9,
"xmlhttprequest-ssl": 10
} ],
6: [ function(t, e) {
(function(n) {
var r = t("./polling"), o = t("component-inherit");
e.exports = p;
var i, s = /\n/g, a = /\\n/g;
function c() {}
function p(t) {
r.call(this, t);
this.query = this.query || {};
if (!i) {
n.___eio || (n.___eio = []);
i = n.___eio;
}
this.index = i.length;
var e = this;
i.push(function(t) {
e.onData(t);
});
this.query.j = this.index;
n.document && n.addEventListener && n.addEventListener("beforeunload", function() {
e.script && (e.script.onerror = c);
}, !1);
}
o(p, r);
p.prototype.supportsBinary = !1;
p.prototype.doClose = function() {
if (this.script) {
this.script.parentNode.removeChild(this.script);
this.script = null;
}
if (this.form) {
this.form.parentNode.removeChild(this.form);
this.form = null;
this.iframe = null;
}
r.prototype.doClose.call(this);
};
p.prototype.doPoll = function() {
var t = this, e = document.createElement("script");
if (this.script) {
this.script.parentNode.removeChild(this.script);
this.script = null;
}
e.async = !0;
e.src = this.uri();
e.onerror = function(e) {
t.onError("jsonp poll error", e);
};
var n = document.getElementsByTagName("script")[0];
n ? n.parentNode.insertBefore(e, n) : (document.head || document.body).appendChild(e);
this.script = e;
"undefined" != typeof navigator && /gecko/i.test(navigator.userAgent) && setTimeout(function() {
var t = document.createElement("iframe");
document.body.appendChild(t);
document.body.removeChild(t);
}, 100);
};
p.prototype.doWrite = function(t, e) {
var n = this;
if (!this.form) {
var r, o = document.createElement("form"), i = document.createElement("textarea"), c = this.iframeId = "eio_iframe_" + this.index;
o.className = "socketio";
o.style.position = "absolute";
o.style.top = "-1000px";
o.style.left = "-1000px";
o.target = c;
o.method = "POST";
o.setAttribute("accept-charset", "utf-8");
i.name = "d";
o.appendChild(i);
document.body.appendChild(o);
this.form = o;
this.area = i;
}
this.form.action = this.uri();
function p() {
f();
e();
}
function f() {
if (n.iframe) try {
n.form.removeChild(n.iframe);
} catch (t) {
n.onError("jsonp polling iframe removal error", t);
}
try {
var t = '<iframe src="javascript:0" name="' + n.iframeId + '">';
r = document.createElement(t);
} catch (t) {
(r = document.createElement("iframe")).name = n.iframeId;
r.src = "javascript:0";
}
r.id = n.iframeId;
n.form.appendChild(r);
n.iframe = r;
}
f();
t = t.replace(a, "\\\n");
this.area.value = t.replace(s, "\\n");
try {
this.form.submit();
} catch (t) {}
this.iframe.attachEvent ? this.iframe.onreadystatechange = function() {
"complete" == n.iframe.readyState && p();
} : this.iframe.onload = p;
};
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {
"./polling": 8,
"component-inherit": 16
} ],
7: [ function(t, e) {
(function(n) {
var r = t("xmlhttprequest-ssl"), o = t("./polling"), i = t("component-emitter"), s = t("component-inherit"), a = t("debug")("engine.io-client:polling-xhr");
e.exports = p;
e.exports.Request = f;
function c() {}
function p(t) {
o.call(this, t);
if (n.location) {
var e = "https:" == location.protocol, r = location.port;
r || (r = e ? 443 : 80);
this.xd = t.hostname != n.location.hostname || r != t.port;
this.xs = t.secure != e;
} else this.extraHeaders = t.extraHeaders;
}
s(p, o);
p.prototype.supportsBinary = !0;
p.prototype.request = function(t) {
(t = t || {}).uri = this.uri();
t.xd = this.xd;
t.xs = this.xs;
t.agent = this.agent || !1;
t.supportsBinary = this.supportsBinary;
t.enablesXDR = this.enablesXDR;
t.pfx = this.pfx;
t.key = this.key;
t.passphrase = this.passphrase;
t.cert = this.cert;
t.ca = this.ca;
t.ciphers = this.ciphers;
t.rejectUnauthorized = this.rejectUnauthorized;
t.extraHeaders = this.extraHeaders;
return new f(t);
};
p.prototype.doWrite = function(t, e) {
var n = "string" != typeof t && void 0 !== t, r = this.request({
method: "POST",
data: t,
isBinary: n
}), o = this;
r.on("success", e);
r.on("error", function(t) {
o.onError("xhr post error", t);
});
this.sendXhr = r;
};
p.prototype.doPoll = function() {
a("xhr poll");
var t = this.request(), e = this;
t.on("data", function(t) {
e.onData(t);
});
t.on("error", function(t) {
e.onError("xhr poll error", t);
});
this.pollXhr = t;
};
function f(t) {
this.method = t.method || "GET";
this.uri = t.uri;
this.xd = !!t.xd;
this.xs = !!t.xs;
this.async = !1 !== t.async;
this.data = null != t.data ? t.data : null;
this.agent = t.agent;
this.isBinary = t.isBinary;
this.supportsBinary = t.supportsBinary;
this.enablesXDR = t.enablesXDR;
this.pfx = t.pfx;
this.key = t.key;
this.passphrase = t.passphrase;
this.cert = t.cert;
this.ca = t.ca;
this.ciphers = t.ciphers;
this.rejectUnauthorized = t.rejectUnauthorized;
this.extraHeaders = t.extraHeaders;
this.create();
}
i(f.prototype);
f.prototype.create = function() {
var t = {
agent: this.agent,
xdomain: this.xd,
xscheme: this.xs,
enablesXDR: this.enablesXDR
};
t.pfx = this.pfx;
t.key = this.key;
t.passphrase = this.passphrase;
t.cert = this.cert;
t.ca = this.ca;
t.ciphers = this.ciphers;
t.rejectUnauthorized = this.rejectUnauthorized;
var e = this.xhr = new r(t), o = this;
try {
a("xhr open %s: %s", this.method, this.uri);
e.open(this.method, this.uri, this.async);
try {
if (this.extraHeaders) {
e.setDisableHeaderCheck(!0);
for (var i in this.extraHeaders) this.extraHeaders.hasOwnProperty(i) && e.setRequestHeader(i, this.extraHeaders[i]);
}
} catch (t) {}
this.supportsBinary && (e.responseType = "arraybuffer");
if ("POST" == this.method) try {
this.isBinary ? e.setRequestHeader("Content-type", "application/octet-stream") : e.setRequestHeader("Content-type", "text/plain;charset=UTF-8");
} catch (t) {}
"withCredentials" in e && (e.withCredentials = !0);
if (this.hasXDR()) {
e.onload = function() {
o.onLoad();
};
e.onerror = function() {
o.onError(e.responseText);
};
} else e.onreadystatechange = function() {
4 == e.readyState && (200 == e.status || 1223 == e.status ? o.onLoad() : setTimeout(function() {
o.onError(e.status);
}, 0));
};
a("xhr data %s", this.data);
e.send(this.data);
} catch (t) {
setTimeout(function() {
o.onError(t);
}, 0);
return;
}
if (n.document) {
this.index = f.requestsCount++;
f.requests[this.index] = this;
}
};
f.prototype.onSuccess = function() {
this.emit("success");
this.cleanup();
};
f.prototype.onData = function(t) {
this.emit("data", t);
this.onSuccess();
};
f.prototype.onError = function(t) {
this.emit("error", t);
this.cleanup(!0);
};
f.prototype.cleanup = function(t) {
if ("undefined" != typeof this.xhr && null !== this.xhr) {
this.hasXDR() ? this.xhr.onload = this.xhr.onerror = c : this.xhr.onreadystatechange = c;
if (t) try {
this.xhr.abort();
} catch (t) {}
n.document && delete f.requests[this.index];
this.xhr = null;
}
};
f.prototype.onLoad = function() {
var t;
try {
var e;
try {
e = this.xhr.getResponseHeader("Content-Type").split(";")[0];
} catch (t) {}
if ("application/octet-stream" === e) t = this.xhr.response; else if (this.supportsBinary) try {
t = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response));
} catch (e) {
for (var n = new Uint8Array(this.xhr.response), r = [], o = 0, i = n.length; o < i; o++) r.push(n[o]);
t = String.fromCharCode.apply(null, r);
} else t = this.xhr.responseText;
} catch (t) {
this.onError(t);
}
null != t && this.onData(t);
};
f.prototype.hasXDR = function() {
return "undefined" != typeof n.XDomainRequest && !this.xs && this.enablesXDR;
};
f.prototype.abort = function() {
this.cleanup();
};
if (n.document) {
f.requestsCount = 0;
f.requests = {};
n.attachEvent ? n.attachEvent("onunload", u) : n.addEventListener && n.addEventListener("beforeunload", u, !1);
}
function u() {
for (var t in f.requests) f.requests.hasOwnProperty(t) && f.requests[t].abort();
}
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {
"./polling": 8,
"component-emitter": 15,
"component-inherit": 16,
debug: 17,
"xmlhttprequest-ssl": 10
} ],
8: [ function(t, e) {
var n = t("../transport"), r = t("parseqs"), o = t("engine.io-parser"), i = t("component-inherit"), s = t("yeast"), a = t("debug")("engine.io-client:polling");
e.exports = p;
var c = null != new (t("xmlhttprequest-ssl"))({
xdomain: !1
}).responseType;
function p(t) {
var e = t && t.forceBase64;
c && !e || (this.supportsBinary = !1);
n.call(this, t);
}
i(p, n);
p.prototype.name = "polling";
p.prototype.doOpen = function() {
this.poll();
};
p.prototype.pause = function(t) {
var e = this;
this.readyState = "pausing";
function n() {
a("paused");
e.readyState = "paused";
t();
}
if (this.polling || !this.writable) {
var r = 0;
if (this.polling) {
a("we are currently polling - waiting to pause");
r++;
this.once("pollComplete", function() {
a("pre-pause polling complete");
--r || n();
});
}
if (!this.writable) {
a("we are currently writing - waiting to pause");
r++;
this.once("drain", function() {
a("pre-pause writing complete");
--r || n();
});
}
} else n();
};
p.prototype.poll = function() {
a("polling");
this.polling = !0;
this.doPoll();
this.emit("poll");
};
p.prototype.onData = function(t) {
var e = this;
a("polling got data %s", t);
o.decodePayload(t, this.socket.binaryType, function(t) {
"opening" == e.readyState && e.onOpen();
if ("close" == t.type) {
e.onClose();
return !1;
}
e.onPacket(t);
});
if ("closed" != this.readyState) {
this.polling = !1;
this.emit("pollComplete");
"open" == this.readyState ? this.poll() : a('ignoring poll - transport state "%s"', this.readyState);
}
};
p.prototype.doClose = function() {
var t = this;
function e() {
a("writing close packet");
t.write([ {
type: "close"
} ]);
}
if ("open" == this.readyState) {
a("transport open - closing");
e();
} else {
a("transport not open - deferring close");
this.once("open", e);
}
};
p.prototype.write = function(t) {
var e = this;
this.writable = !1;
var n = function() {
e.writable = !0;
e.emit("drain");
};
e = this;
o.encodePayload(t, this.supportsBinary, function(t) {
e.doWrite(t, n);
});
};
p.prototype.uri = function() {
var t = this.query || {}, e = this.secure ? "https" : "http", n = "";
!1 !== this.timestampRequests && (t[this.timestampParam] = s());
this.supportsBinary || t.sid || (t.b64 = 1);
t = r.encode(t);
this.port && ("https" == e && 443 != this.port || "http" == e && 80 != this.port) && (n = ":" + this.port);
t.length && (t = "?" + t);
return e + "://" + (-1 !== this.hostname.indexOf(":") ? "[" + this.hostname + "]" : this.hostname) + n + this.path + t;
};
}, {
"../transport": 4,
"component-inherit": 16,
debug: 17,
"engine.io-parser": 19,
parseqs: 27,
"xmlhttprequest-ssl": 10,
yeast: 30
} ],
9: [ function(t, e) {
(function(n) {
var r = t("../transport"), o = t("engine.io-parser"), i = t("parseqs"), s = t("component-inherit"), a = t("yeast"), c = t("debug")("engine.io-client:websocket"), p = n.WebSocket || n.MozWebSocket, f = p || ("undefined" != typeof window ? null : t("ws"));
e.exports = u;
function u(t) {
t && t.forceBase64 && (this.supportsBinary = !1);
this.perMessageDeflate = t.perMessageDeflate;
r.call(this, t);
}
s(u, r);
u.prototype.name = "websocket";
u.prototype.supportsBinary = !0;
u.prototype.doOpen = function() {
if (this.check()) {
var t = this.uri(), e = {
agent: this.agent,
perMessageDeflate: this.perMessageDeflate
};
e.pfx = this.pfx;
e.key = this.key;
e.passphrase = this.passphrase;
e.cert = this.cert;
e.ca = this.ca;
e.ciphers = this.ciphers;
e.rejectUnauthorized = this.rejectUnauthorized;
this.extraHeaders && (e.headers = this.extraHeaders);
this.ws = p ? new f(t) : new f(t, void 0, e);
void 0 === this.ws.binaryType && (this.supportsBinary = !1);
if (this.ws.supports && this.ws.supports.binary) {
this.supportsBinary = !0;
this.ws.binaryType = "buffer";
} else this.ws.binaryType = "arraybuffer";
this.addEventListeners();
}
};
u.prototype.addEventListeners = function() {
var t = this;
this.ws.onopen = function() {
t.onOpen();
};
this.ws.onclose = function() {
t.onClose();
};
this.ws.onmessage = function(e) {
t.onData(e.data);
};
this.ws.onerror = function(e) {
t.onError("websocket error", e);
};
};
"undefined" != typeof navigator && /iPad|iPhone|iPod/i.test(navigator.userAgent) && (u.prototype.onData = function(t) {
var e = this;
setTimeout(function() {
r.prototype.onData.call(e, t);
}, 0);
});
u.prototype.write = function(t) {
var e = this;
this.writable = !1;
for (var r = t.length, i = 0, s = r; i < s; i++) (function(t) {
o.encodePacket(t, e.supportsBinary, function(o) {
if (!p) {
var i = {};
t.options && (i.compress = t.options.compress);
e.perMessageDeflate && ("string" == typeof o ? n.Buffer.byteLength(o) : o.length) < e.perMessageDeflate.threshold && (i.compress = !1);
}
try {
p ? e.ws.send(o) : e.ws.send(o, i);
} catch (t) {
c("websocket closed before onclose event");
}
--r || a();
});
})(t[i]);
function a() {
e.emit("flush");
setTimeout(function() {
e.writable = !0;
e.emit("drain");
}, 0);
}
};
u.prototype.onClose = function() {
r.prototype.onClose.call(this);
};
u.prototype.doClose = function() {
"undefined" != typeof this.ws && this.ws.close();
};
u.prototype.uri = function() {
var t = this.query || {}, e = this.secure ? "wss" : "ws", n = "";
this.port && ("wss" == e && 443 != this.port || "ws" == e && 80 != this.port) && (n = ":" + this.port);
this.timestampRequests && (t[this.timestampParam] = a());
this.supportsBinary || (t.b64 = 1);
(t = i.encode(t)).length && (t = "?" + t);
return e + "://" + (-1 !== this.hostname.indexOf(":") ? "[" + this.hostname + "]" : this.hostname) + n + this.path + t;
};
u.prototype.check = function() {
return !(!f || "__initialize" in f && this.name === u.prototype.name);
};
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {
"../transport": 4,
"component-inherit": 16,
debug: 17,
"engine.io-parser": 19,
parseqs: 27,
ws: void 0,
yeast: 30
} ],
10: [ function(t, e) {
var n = t("has-cors");
e.exports = function(t) {
var e = t.xdomain, r = t.xscheme, o = t.enablesXDR;
try {
if ("undefined" != typeof XMLHttpRequest && (!e || n)) return new XMLHttpRequest();
} catch (t) {}
try {
if ("undefined" != typeof XDomainRequest && !r && o) return new XDomainRequest();
} catch (t) {}
if (!e) try {
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (t) {}
};
}, {
"has-cors": 22
} ],
11: [ function(t, e) {
e.exports = function(t, e, r) {
var o = !1;
r = r || n;
i.count = t;
return 0 === t ? e() : i;
function i(t, n) {
if (i.count <= 0) throw new Error("after called too many times");
--i.count;
if (t) {
o = !0;
e(t);
e = r;
} else 0 !== i.count || o || e(null, n);
}
};
function n() {}
}, {} ],
12: [ function(t, e) {
e.exports = function(t, e, n) {
var r = t.byteLength;
e = e || 0;
n = n || r;
if (t.slice) return t.slice(e, n);
e < 0 && (e += r);
n < 0 && (n += r);
n > r && (n = r);
if (e >= r || e >= n || 0 === r) return new ArrayBuffer(0);
for (var o = new Uint8Array(t), i = new Uint8Array(n - e), s = e, a = 0; s < n; s++, 
a++) i[a] = o[s];
return i.buffer;
};
}, {} ],
13: [ function(t, e, n) {
(function(t) {
"use strict";
n.encode = function(e) {
var n, r = new Uint8Array(e), o = r.length, i = "";
for (n = 0; n < o; n += 3) {
i += t[r[n] >> 2];
i += t[(3 & r[n]) << 4 | r[n + 1] >> 4];
i += t[(15 & r[n + 1]) << 2 | r[n + 2] >> 6];
i += t[63 & r[n + 2]];
}
o % 3 == 2 ? i = i.substring(0, i.length - 1) + "=" : o % 3 == 1 && (i = i.substring(0, i.length - 2) + "==");
return i;
};
n.decode = function(e) {
var n, r, o, i, s, a = .75 * e.length, c = e.length, p = 0;
if ("=" === e[e.length - 1]) {
a--;
"=" === e[e.length - 2] && a--;
}
var f = new ArrayBuffer(a), u = new Uint8Array(f);
for (n = 0; n < c; n += 4) {
r = t.indexOf(e[n]);
o = t.indexOf(e[n + 1]);
i = t.indexOf(e[n + 2]);
s = t.indexOf(e[n + 3]);
u[p++] = r << 2 | o >> 4;
u[p++] = (15 & o) << 4 | i >> 2;
u[p++] = (3 & i) << 6 | 63 & s;
}
return f;
};
})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
}, {} ],
14: [ function(t, e) {
(function(t) {
var n = t.BlobBuilder || t.WebKitBlobBuilder || t.MSBlobBuilder || t.MozBlobBuilder, r = function() {
try {
return 2 === new Blob([ "hi" ]).size;
} catch (t) {
return !1;
}
}(), o = r && function() {
try {
return 2 === new Blob([ new Uint8Array([ 1, 2 ]) ]).size;
} catch (t) {
return !1;
}
}(), i = n && n.prototype.append && n.prototype.getBlob;
function s(t) {
for (var e = 0; e < t.length; e++) {
var n = t[e];
if (n.buffer instanceof ArrayBuffer) {
var r = n.buffer;
if (n.byteLength !== r.byteLength) {
var o = new Uint8Array(n.byteLength);
o.set(new Uint8Array(r, n.byteOffset, n.byteLength));
r = o.buffer;
}
t[e] = r;
}
}
}
e.exports = r ? o ? t.Blob : function(t, e) {
s(t);
return new Blob(t, e || {});
} : i ? function(t, e) {
e = e || {};
var r = new n();
s(t);
for (var o = 0; o < t.length; o++) r.append(t[o]);
return e.type ? r.getBlob(e.type) : r.getBlob();
} : void 0;
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {} ],
15: [ function(t, e) {
e.exports = n;
function n(t) {
if (t) return r(t);
}
function r(t) {
for (var e in n.prototype) t[e] = n.prototype[e];
return t;
}
n.prototype.on = n.prototype.addEventListener = function(t, e) {
this._callbacks = this._callbacks || {};
(this._callbacks[t] = this._callbacks[t] || []).push(e);
return this;
};
n.prototype.once = function(t, e) {
var n = this;
this._callbacks = this._callbacks || {};
function r() {
n.off(t, r);
e.apply(this, arguments);
}
r.fn = e;
this.on(t, r);
return this;
};
n.prototype.off = n.prototype.removeListener = n.prototype.removeAllListeners = n.prototype.removeEventListener = function(t, e) {
this._callbacks = this._callbacks || {};
if (0 == arguments.length) {
this._callbacks = {};
return this;
}
var n, r = this._callbacks[t];
if (!r) return this;
if (1 == arguments.length) {
delete this._callbacks[t];
return this;
}
for (var o = 0; o < r.length; o++) if ((n = r[o]) === e || n.fn === e) {
r.splice(o, 1);
break;
}
return this;
};
n.prototype.emit = function(t) {
this._callbacks = this._callbacks || {};
var e = [].slice.call(arguments, 1), n = this._callbacks[t];
if (n) for (var r = 0, o = (n = n.slice(0)).length; r < o; ++r) n[r].apply(this, e);
return this;
};
n.prototype.listeners = function(t) {
this._callbacks = this._callbacks || {};
return this._callbacks[t] || [];
};
n.prototype.hasListeners = function(t) {
return !!this.listeners(t).length;
};
}, {} ],
16: [ function(t, e) {
e.exports = function(t, e) {
var n = function() {};
n.prototype = e.prototype;
t.prototype = new n();
t.prototype.constructor = t;
};
}, {} ],
17: [ function(t, e, n) {
(n = e.exports = t("./debug")).log = function() {
return "object" == typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);
};
n.formatArgs = function() {
var t = arguments, e = this.useColors;
t[0] = (e ? "%c" : "") + this.namespace + (e ? " %c" : " ") + t[0] + (e ? "%c " : " ") + "+" + n.humanize(this.diff);
if (!e) return t;
var r = "color: " + this.color;
t = [ t[0], r, "color: inherit" ].concat(Array.prototype.slice.call(t, 1));
var o = 0, i = 0;
t[0].replace(/%[a-z%]/g, function(t) {
if ("%%" !== t) {
o++;
"%c" === t && (i = o);
}
});
t.splice(i, 0, r);
return t;
};
n.save = function(t) {
try {
null == t ? n.storage.removeItem("debug") : n.storage.debug = t;
} catch (t) {}
};
n.load = r;
n.useColors = function() {
return "WebkitAppearance" in document.documentElement.style || window.console && (console.firebug || console.exception && console.table) || navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31;
};
n.storage = "undefined" != typeof chrome && "undefined" != typeof chrome.storage ? chrome.storage.local : function() {
try {
return window.localStorage;
} catch (t) {}
}();
n.colors = [ "lightseagreen", "forestgreen", "goldenrod", "dodgerblue", "darkorchid", "crimson" ];
n.formatters.j = function(t) {
return JSON.stringify(t);
};
function r() {
var t;
try {
t = n.storage.debug;
} catch (t) {}
return t;
}
n.enable(r());
}, {
"./debug": 18
} ],
18: [ function(t, e, n) {
(n = e.exports = function(t) {
function e() {}
e.enabled = !1;
function i() {
var t = i, e = +new Date(), s = e - (r || e);
t.diff = s;
t.prev = r;
t.curr = e;
r = e;
null == t.useColors && (t.useColors = n.useColors());
null == t.color && t.useColors && (t.color = n.colors[o++ % n.colors.length]);
var a = Array.prototype.slice.call(arguments);
a[0] = n.coerce(a[0]);
"string" != typeof a[0] && (a = [ "%o" ].concat(a));
var c = 0;
a[0] = a[0].replace(/%([a-z%])/g, function(e, r) {
if ("%%" === e) return e;
c++;
var o = n.formatters[r];
if ("function" == typeof o) {
var i = a[c];
e = o.call(t, i);
a.splice(c, 1);
c--;
}
return e;
});
"function" == typeof n.formatArgs && (a = n.formatArgs.apply(t, a));
(i.log || n.log || console.log.bind(console)).apply(t, a);
}
i.enabled = !0;
var s = n.enabled(t) ? i : e;
s.namespace = t;
return s;
}).coerce = function(t) {
return t instanceof Error ? t.stack || t.message : t;
};
n.disable = function() {
n.enable("");
};
n.enable = function(t) {
n.save(t);
for (var e = (t || "").split(/[\s,]+/), r = e.length, o = 0; o < r; o++) e[o] && ("-" === (t = e[o].replace(/\*/g, ".*?"))[0] ? n.skips.push(new RegExp("^" + t.substr(1) + "$")) : n.names.push(new RegExp("^" + t + "$")));
};
n.enabled = function(t) {
var e, r;
for (e = 0, r = n.skips.length; e < r; e++) if (n.skips[e].test(t)) return !1;
for (e = 0, r = n.names.length; e < r; e++) if (n.names[e].test(t)) return !0;
return !1;
};
n.humanize = t("ms");
n.names = [];
n.skips = [];
n.formatters = {};
var r, o = 0;
}, {
ms: 25
} ],
19: [ function(t, e, n) {
(function(e) {
var r = t("./keys"), o = t("has-binary"), i = t("arraybuffer.slice"), s = t("base64-arraybuffer"), a = t("after"), c = t("utf8"), p = navigator.userAgent.match(/Android/i), f = /PhantomJS/i.test(navigator.userAgent), u = p || f;
n.protocol = 3;
var h = n.packets = {
open: 0,
close: 1,
ping: 2,
pong: 3,
message: 4,
upgrade: 5,
noop: 6
}, l = r(h), d = {
type: "error",
data: "parser error"
}, y = t("blob");
n.encodePacket = function(t, n, r, o) {
if ("function" == typeof n) {
o = n;
n = !1;
}
if ("function" == typeof r) {
o = r;
r = null;
}
var i = void 0 === t.data ? void 0 : t.data.buffer || t.data;
if (e.ArrayBuffer && i instanceof ArrayBuffer) return m(t, n, o);
if (y && i instanceof e.Blob) return v(t, n, o);
if (i && i.base64) return g(t, o);
var s = h[t.type];
void 0 !== t.data && (s += r ? c.encode(String(t.data)) : String(t.data));
return o("" + s);
};
function g(t, e) {
return e("b" + n.packets[t.type] + t.data.data);
}
function m(t, e, r) {
if (!e) return n.encodeBase64Packet(t, r);
var o = t.data, i = new Uint8Array(o), s = new Uint8Array(1 + o.byteLength);
s[0] = h[t.type];
for (var a = 0; a < i.length; a++) s[a + 1] = i[a];
return r(s.buffer);
}
function b(t, e, r) {
if (!e) return n.encodeBase64Packet(t, r);
var o = new FileReader();
o.onload = function() {
t.data = o.result;
n.encodePacket(t, e, !0, r);
};
return o.readAsArrayBuffer(t.data);
}
function v(t, e, r) {
if (!e) return n.encodeBase64Packet(t, r);
if (u) return b(t, e, r);
var o = new Uint8Array(1);
o[0] = h[t.type];
return r(new y([ o.buffer, t.data ]));
}
n.encodeBase64Packet = function(t, r) {
var o, i = "b" + n.packets[t.type];
if (y && t.data instanceof e.Blob) {
var s = new FileReader();
s.onload = function() {
var t = s.result.split(",")[1];
r(i + t);
};
return s.readAsDataURL(t.data);
}
try {
o = String.fromCharCode.apply(null, new Uint8Array(t.data));
} catch (e) {
for (var a = new Uint8Array(t.data), c = new Array(a.length), p = 0; p < a.length; p++) c[p] = a[p];
o = String.fromCharCode.apply(null, c);
}
i += e.btoa(o);
return r(i);
};
n.decodePacket = function(t, e, r) {
if ("string" == typeof t || void 0 === t) {
if ("b" == t.charAt(0)) return n.decodeBase64Packet(t.substr(1), e);
if (r) try {
t = c.decode(t);
} catch (t) {
return d;
}
var o = t.charAt(0);
return Number(o) == o && l[o] ? t.length > 1 ? {
type: l[o],
data: t.substring(1)
} : {
type: l[o]
} : d;
}
o = new Uint8Array(t)[0];
var s = i(t, 1);
y && "blob" === e && (s = new y([ s ]));
return {
type: l[o],
data: s
};
};
n.decodeBase64Packet = function(t, n) {
var r = l[t.charAt(0)];
if (!e.ArrayBuffer) return {
type: r,
data: {
base64: !0,
data: t.substr(1)
}
};
var o = s.decode(t.substr(1));
"blob" === n && y && (o = new y([ o ]));
return {
type: r,
data: o
};
};
n.encodePayload = function(t, e, r) {
if ("function" == typeof e) {
r = e;
e = null;
}
var i = o(t);
if (e && i) return y && !u ? n.encodePayloadAsBlob(t, r) : n.encodePayloadAsArrayBuffer(t, r);
if (!t.length) return r("0:");
function s(t) {
return t.length + ":" + t;
}
w(t, function(t, r) {
n.encodePacket(t, !!i && e, !0, function(t) {
r(null, s(t));
});
}, function(t, e) {
return r(e.join(""));
});
};
function w(t, e, n) {
for (var r = new Array(t.length), o = a(t.length, n), i = function(t, n, o) {
e(n, function(e, n) {
r[t] = n;
o(e, r);
});
}, s = 0; s < t.length; s++) i(s, t[s], o);
}
n.decodePayload = function(t, e, r) {
if ("string" != typeof t) return n.decodePayloadAsBinary(t, e, r);
if ("function" == typeof e) {
r = e;
e = null;
}
var o;
if ("" == t) return r(d, 0, 1);
for (var i, s, a = "", c = 0, p = t.length; c < p; c++) {
var f = t.charAt(c);
if (":" != f) a += f; else {
if ("" == a || a != (i = Number(a))) return r(d, 0, 1);
if (a != (s = t.substr(c + 1, i)).length) return r(d, 0, 1);
if (s.length) {
o = n.decodePacket(s, e, !0);
if (d.type == o.type && d.data == o.data) return r(d, 0, 1);
if (!1 === r(o, c + i, p)) return;
}
c += i;
a = "";
}
}
return "" != a ? r(d, 0, 1) : void 0;
};
n.encodePayloadAsArrayBuffer = function(t, e) {
if (!t.length) return e(new ArrayBuffer(0));
w(t, function(t, e) {
n.encodePacket(t, !0, !0, function(t) {
return e(null, t);
});
}, function(t, n) {
var r = n.reduce(function(t, e) {
var n;
return t + (n = "string" == typeof e ? e.length : e.byteLength).toString().length + n + 2;
}, 0), o = new Uint8Array(r), i = 0;
n.forEach(function(t) {
var e = "string" == typeof t, n = t;
if (e) {
for (var r = new Uint8Array(t.length), s = 0; s < t.length; s++) r[s] = t.charCodeAt(s);
n = r.buffer;
}
o[i++] = e ? 0 : 1;
var a = n.byteLength.toString();
for (s = 0; s < a.length; s++) o[i++] = parseInt(a[s]);
o[i++] = 255;
for (r = new Uint8Array(n), s = 0; s < r.length; s++) o[i++] = r[s];
});
return e(o.buffer);
});
};
n.encodePayloadAsBlob = function(t, e) {
w(t, function(t, e) {
n.encodePacket(t, !0, !0, function(t) {
var n = new Uint8Array(1);
n[0] = 1;
if ("string" == typeof t) {
for (var r = new Uint8Array(t.length), o = 0; o < t.length; o++) r[o] = t.charCodeAt(o);
t = r.buffer;
n[0] = 0;
}
var i = (t instanceof ArrayBuffer ? t.byteLength : t.size).toString(), s = new Uint8Array(i.length + 1);
for (o = 0; o < i.length; o++) s[o] = parseInt(i[o]);
s[i.length] = 255;
if (y) {
var a = new y([ n.buffer, s.buffer, t ]);
e(null, a);
}
});
}, function(t, n) {
return e(new y(n));
});
};
n.decodePayloadAsBinary = function(t, e, r) {
if ("function" == typeof e) {
r = e;
e = null;
}
for (var o = t, s = [], a = !1; o.byteLength > 0; ) {
for (var c = new Uint8Array(o), p = 0 === c[0], f = "", u = 1; 255 != c[u]; u++) {
if (f.length > 310) {
a = !0;
break;
}
f += c[u];
}
if (a) return r(d, 0, 1);
o = i(o, 2 + f.length);
f = parseInt(f);
var h = i(o, 0, f);
if (p) try {
h = String.fromCharCode.apply(null, new Uint8Array(h));
} catch (t) {
var l = new Uint8Array(h);
h = "";
for (u = 0; u < l.length; u++) h += String.fromCharCode(l[u]);
}
s.push(h);
o = i(o, f);
}
var y = s.length;
s.forEach(function(t, o) {
r(n.decodePacket(t, e, !0), o, y);
});
};
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {
"./keys": 20,
after: 11,
"arraybuffer.slice": 12,
"base64-arraybuffer": 13,
blob: 14,
"has-binary": 21,
utf8: 29
} ],
20: [ function(t, e) {
e.exports = Object.keys || function(t) {
var e = [], n = Object.prototype.hasOwnProperty;
for (var r in t) n.call(t, r) && e.push(r);
return e;
};
}, {} ],
21: [ function(t, e) {
(function(n) {
var r = t("isarray");
e.exports = function(t) {
return function t(e) {
if (!e) return !1;
if (n.Buffer && n.Buffer.isBuffer(e) || n.ArrayBuffer && e instanceof ArrayBuffer || n.Blob && e instanceof Blob || n.File && e instanceof File) return !0;
if (r(e)) {
for (var o = 0; o < e.length; o++) if (t(e[o])) return !0;
} else if (e && "object" == typeof e) {
e.toJSON && (e = e.toJSON());
for (var i in e) if (Object.prototype.hasOwnProperty.call(e, i) && t(e[i])) return !0;
}
return !1;
}(t);
};
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {
isarray: 24
} ],
22: [ function(t, e) {
try {
e.exports = "undefined" != typeof XMLHttpRequest && "withCredentials" in new XMLHttpRequest();
} catch (t) {
e.exports = !1;
}
}, {} ],
23: [ function(t, e) {
var n = [].indexOf;
e.exports = function(t, e) {
if (n) return t.indexOf(e);
for (var r = 0; r < t.length; ++r) if (t[r] === e) return r;
return -1;
};
}, {} ],
24: [ function(t, e) {
e.exports = Array.isArray || function(t) {
return "[object Array]" == Object.prototype.toString.call(t);
};
}, {} ],
25: [ function(t, e) {
var n = 1e3, r = 60 * n, o = 60 * r, i = 24 * o, s = 365.25 * i;
e.exports = function(t, e) {
e = e || {};
return "string" == typeof t ? a(t) : e.long ? p(s = t, i, "day") || p(s, o, "hour") || p(s, r, "minute") || p(s, n, "second") || s + " ms" : c(t);
var s;
};
function a(t) {
if (!((t = "" + t).length > 1e4)) {
var e = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);
if (e) {
var a = parseFloat(e[1]);
switch ((e[2] || "ms").toLowerCase()) {
case "years":
case "year":
case "yrs":
case "yr":
case "y":
return a * s;

case "days":
case "day":
case "d":
return a * i;

case "hours":
case "hour":
case "hrs":
case "hr":
case "h":
return a * o;

case "minutes":
case "minute":
case "mins":
case "min":
case "m":
return a * r;

case "seconds":
case "second":
case "secs":
case "sec":
case "s":
return a * n;

case "milliseconds":
case "millisecond":
case "msecs":
case "msec":
case "ms":
return a;
}
}
}
}
function c(t) {
return t >= i ? Math.round(t / i) + "d" : t >= o ? Math.round(t / o) + "h" : t >= r ? Math.round(t / r) + "m" : t >= n ? Math.round(t / n) + "s" : t + "ms";
}
function p(t, e, n) {
if (!(t < e)) return t < 1.5 * e ? Math.floor(t / e) + " " + n : Math.ceil(t / e) + " " + n + "s";
}
}, {} ],
26: [ function(t, e) {
(function(t) {
var n = /^[\],:{}\s]*$/, r = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, o = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, i = /(?:^|:|,)(?:\s*\[)+/g, s = /^\s+/, a = /\s+$/;
e.exports = function(e) {
if ("string" != typeof e || !e) return null;
e = e.replace(s, "").replace(a, "");
return t.JSON && JSON.parse ? JSON.parse(e) : n.test(e.replace(r, "@").replace(o, "]").replace(i, "")) ? new Function("return " + e)() : void 0;
};
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {} ],
27: [ function(t, e, n) {
n.encode = function(t) {
var e = "";
for (var n in t) if (t.hasOwnProperty(n)) {
e.length && (e += "&");
e += encodeURIComponent(n) + "=" + encodeURIComponent(t[n]);
}
return e;
};
n.decode = function(t) {
for (var e = {}, n = t.split("&"), r = 0, o = n.length; r < o; r++) {
var i = n[r].split("=");
e[decodeURIComponent(i[0])] = decodeURIComponent(i[1]);
}
return e;
};
}, {} ],
28: [ function(t, e) {
var n = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, r = [ "source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor" ];
e.exports = function(t) {
var e = t, o = t.indexOf("["), i = t.indexOf("]");
-1 != o && -1 != i && (t = t.substring(0, o) + t.substring(o, i).replace(/:/g, ";") + t.substring(i, t.length));
for (var s = n.exec(t || ""), a = {}, c = 14; c--; ) a[r[c]] = s[c] || "";
if (-1 != o && -1 != i) {
a.source = e;
a.host = a.host.substring(1, a.host.length - 1).replace(/;/g, ":");
a.authority = a.authority.replace("[", "").replace("]", "").replace(/;/g, ":");
a.ipv6uri = !0;
}
return a;
};
}, {} ],
29: [ function(t, e, n) {
(function(t) {
(function(r) {
var o = "object" == typeof n && n, i = "object" == typeof e && e && e.exports == o && e, s = "object" == typeof t && t;
s.global !== s && s.window !== s || (r = s);
var a, c, p, f = String.fromCharCode;
function u(t) {
for (var e, n, r = [], o = 0, i = t.length; o < i; ) if ((e = t.charCodeAt(o++)) >= 55296 && e <= 56319 && o < i) if (56320 == (64512 & (n = t.charCodeAt(o++)))) r.push(((1023 & e) << 10) + (1023 & n) + 65536); else {
r.push(e);
o--;
} else r.push(e);
return r;
}
function h(t) {
for (var e, n = t.length, r = -1, o = ""; ++r < n; ) {
if ((e = t[r]) > 65535) {
o += f((e -= 65536) >>> 10 & 1023 | 55296);
e = 56320 | 1023 & e;
}
o += f(e);
}
return o;
}
function l(t) {
if (t >= 55296 && t <= 57343) throw Error("Lone surrogate U+" + t.toString(16).toUpperCase() + " is not a scalar value");
}
function d(t, e) {
return f(t >> e & 63 | 128);
}
function y(t) {
if (0 == (4294967168 & t)) return f(t);
var e = "";
if (0 == (4294965248 & t)) e = f(t >> 6 & 31 | 192); else if (0 == (4294901760 & t)) {
l(t);
e = f(t >> 12 & 15 | 224);
e += d(t, 6);
} else if (0 == (4292870144 & t)) {
e = f(t >> 18 & 7 | 240);
e += d(t, 12);
e += d(t, 6);
}
return e + f(63 & t | 128);
}
function g() {
if (p >= c) throw Error("Invalid byte index");
var t = 255 & a[p];
p++;
if (128 == (192 & t)) return 63 & t;
throw Error("Invalid continuation byte");
}
function m() {
var t, e;
if (p > c) throw Error("Invalid byte index");
if (p == c) return !1;
t = 255 & a[p];
p++;
if (0 == (128 & t)) return t;
if (192 == (224 & t)) {
if ((e = (31 & t) << 6 | g()) >= 128) return e;
throw Error("Invalid continuation byte");
}
if (224 == (240 & t)) {
if ((e = (15 & t) << 12 | g() << 6 | g()) >= 2048) {
l(e);
return e;
}
throw Error("Invalid continuation byte");
}
if (240 == (248 & t) && (e = (15 & t) << 18 | g() << 12 | g() << 6 | g()) >= 65536 && e <= 1114111) return e;
throw Error("Invalid UTF-8 detected");
}
var b = {
version: "2.0.0",
encode: function(t) {
for (var e = u(t), n = e.length, r = -1, o = ""; ++r < n; ) o += y(e[r]);
return o;
},
decode: function(t) {
a = u(t);
c = a.length;
p = 0;
for (var e, n = []; !1 !== (e = m()); ) n.push(e);
return h(n);
}
};
if (o && !o.nodeType) if (i) i.exports = b; else {
var v = {}.hasOwnProperty;
for (var w in b) v.call(b, w) && (o[w] = b[w]);
} else r.utf8 = b;
})(this);
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {} ],
30: [ function(t, e) {
"use strict";
var n, r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), o = 64, i = {}, s = 0, a = 0;
function c(t) {
var e = "";
do {
e = r[t % o] + e;
t = Math.floor(t / o);
} while (t > 0);
return e;
}
function p() {
var t = c(+new Date());
return t !== n ? (s = 0, n = t) : t + "." + c(s++);
}
for (;a < o; a++) i[r[a]] = a;
p.encode = c;
p.decode = function(t) {
var e = 0;
for (a = 0; a < t.length; a++) e = e * o + i[t.charAt(a)];
return e;
};
e.exports = p;
}, {} ],
31: [ function(t, e, n) {
var r = t("./url"), o = t("socket.io-parser"), i = t("./manager"), s = t("debug")("socket.io-client");
e.exports = n = c;
var a = n.managers = {};
function c(t, e) {
if ("object" == typeof t) {
e = t;
t = void 0;
}
e = e || {};
var n, o = r(t), c = o.source, p = o.id, f = o.path, u = a[p] && f in a[p].nsps;
if (e.forceNew || e["force new connection"] || !1 === e.multiplex || u) {
s("ignoring socket cache for %s", c);
n = i(c, e);
} else {
if (!a[p]) {
s("new io instance for %s", c);
a[p] = i(c, e);
}
n = a[p];
}
return n.socket(o.path);
}
n.protocol = o.protocol;
n.connect = c;
n.Manager = t("./manager");
n.Socket = t("./socket");
}, {
"./manager": 32,
"./socket": 34,
"./url": 35,
debug: 39,
"socket.io-parser": 47
} ],
32: [ function(t, e) {
var n = t("engine.io-client"), r = t("./socket"), o = t("component-emitter"), i = t("socket.io-parser"), s = t("./on"), a = t("component-bind"), c = t("debug")("socket.io-client:manager"), p = t("indexof"), f = t("backo2"), u = Object.prototype.hasOwnProperty;
e.exports = h;
function h(t, e) {
if (!(this instanceof h)) return new h(t, e);
if (t && "object" == typeof t) {
e = t;
t = void 0;
}
(e = e || {}).path = e.path || "/socket.io";
this.nsps = {};
this.subs = [];
this.opts = e;
this.reconnection(!1 !== e.reconnection);
this.reconnectionAttempts(e.reconnectionAttempts || Infinity);
this.reconnectionDelay(e.reconnectionDelay || 1e3);
this.reconnectionDelayMax(e.reconnectionDelayMax || 5e3);
this.randomizationFactor(e.randomizationFactor || .5);
this.backoff = new f({
min: this.reconnectionDelay(),
max: this.reconnectionDelayMax(),
jitter: this.randomizationFactor()
});
this.timeout(null == e.timeout ? 2e4 : e.timeout);
this.readyState = "closed";
this.uri = t;
this.connecting = [];
this.lastPing = null;
this.encoding = !1;
this.packetBuffer = [];
this.encoder = new i.Encoder();
this.decoder = new i.Decoder();
this.autoConnect = !1 !== e.autoConnect;
this.autoConnect && this.open();
}
h.prototype.emitAll = function() {
this.emit.apply(this, arguments);
for (var t in this.nsps) u.call(this.nsps, t) && this.nsps[t].emit.apply(this.nsps[t], arguments);
};
h.prototype.updateSocketIds = function() {
for (var t in this.nsps) u.call(this.nsps, t) && (this.nsps[t].id = this.engine.id);
};
o(h.prototype);
h.prototype.reconnection = function(t) {
if (!arguments.length) return this._reconnection;
this._reconnection = !!t;
return this;
};
h.prototype.reconnectionAttempts = function(t) {
if (!arguments.length) return this._reconnectionAttempts;
this._reconnectionAttempts = t;
return this;
};
h.prototype.reconnectionDelay = function(t) {
if (!arguments.length) return this._reconnectionDelay;
this._reconnectionDelay = t;
this.backoff && this.backoff.setMin(t);
return this;
};
h.prototype.randomizationFactor = function(t) {
if (!arguments.length) return this._randomizationFactor;
this._randomizationFactor = t;
this.backoff && this.backoff.setJitter(t);
return this;
};
h.prototype.reconnectionDelayMax = function(t) {
if (!arguments.length) return this._reconnectionDelayMax;
this._reconnectionDelayMax = t;
this.backoff && this.backoff.setMax(t);
return this;
};
h.prototype.timeout = function(t) {
if (!arguments.length) return this._timeout;
this._timeout = t;
return this;
};
h.prototype.maybeReconnectOnOpen = function() {
!this.reconnecting && this._reconnection && 0 === this.backoff.attempts && this.reconnect();
};
h.prototype.open = h.prototype.connect = function(t) {
c("readyState %s", this.readyState);
if (~this.readyState.indexOf("open")) return this;
c("opening %s", this.uri);
this.engine = n(this.uri, this.opts);
var e = this.engine, r = this;
this.readyState = "opening";
this.skipReconnect = !1;
var o = s(e, "open", function() {
r.onopen();
t && t();
}), i = s(e, "error", function(e) {
c("connect_error");
r.cleanup();
r.readyState = "closed";
r.emitAll("connect_error", e);
if (t) {
var n = new Error("Connection error");
n.data = e;
t(n);
} else r.maybeReconnectOnOpen();
});
if (!1 !== this._timeout) {
var a = this._timeout;
c("connect attempt will timeout after %d", a);
var p = setTimeout(function() {
c("connect attempt timed out after %d", a);
o.destroy();
e.close();
e.emit("error", "timeout");
r.emitAll("connect_timeout", a);
}, a);
this.subs.push({
destroy: function() {
clearTimeout(p);
}
});
}
this.subs.push(o);
this.subs.push(i);
return this;
};
h.prototype.onopen = function() {
c("open");
this.cleanup();
this.readyState = "open";
this.emit("open");
var t = this.engine;
this.subs.push(s(t, "data", a(this, "ondata")));
this.subs.push(s(t, "ping", a(this, "onping")));
this.subs.push(s(t, "pong", a(this, "onpong")));
this.subs.push(s(t, "error", a(this, "onerror")));
this.subs.push(s(t, "close", a(this, "onclose")));
this.subs.push(s(this.decoder, "decoded", a(this, "ondecoded")));
};
h.prototype.onping = function() {
this.lastPing = new Date();
this.emitAll("ping");
};
h.prototype.onpong = function() {
this.emitAll("pong", new Date() - this.lastPing);
};
h.prototype.ondata = function(t) {
this.decoder.add(t);
};
h.prototype.ondecoded = function(t) {
this.emit("packet", t);
};
h.prototype.onerror = function(t) {
c("error", t);
this.emitAll("error", t);
};
h.prototype.socket = function(t) {
var e = this.nsps[t];
if (!e) {
e = new r(this, t);
this.nsps[t] = e;
var n = this;
e.on("connecting", o);
e.on("connect", function() {
e.id = n.engine.id;
});
this.autoConnect && o();
}
function o() {
~p(n.connecting, e) || n.connecting.push(e);
}
return e;
};
h.prototype.destroy = function(t) {
var e = p(this.connecting, t);
~e && this.connecting.splice(e, 1);
this.connecting.length || this.close();
};
h.prototype.packet = function(t) {
c("writing packet %j", t);
var e = this;
if (e.encoding) e.packetBuffer.push(t); else {
e.encoding = !0;
this.encoder.encode(t, function(n) {
for (var r = 0; r < n.length; r++) e.engine.write(n[r], t.options);
e.encoding = !1;
e.processPacketQueue();
});
}
};
h.prototype.processPacketQueue = function() {
if (this.packetBuffer.length > 0 && !this.encoding) {
var t = this.packetBuffer.shift();
this.packet(t);
}
};
h.prototype.cleanup = function() {
c("cleanup");
for (var t; t = this.subs.shift(); ) t.destroy();
this.packetBuffer = [];
this.encoding = !1;
this.lastPing = null;
this.decoder.destroy();
};
h.prototype.close = h.prototype.disconnect = function() {
c("disconnect");
this.skipReconnect = !0;
this.reconnecting = !1;
"opening" == this.readyState && this.cleanup();
this.backoff.reset();
this.readyState = "closed";
this.engine && this.engine.close();
};
h.prototype.onclose = function(t) {
c("onclose");
this.cleanup();
this.backoff.reset();
this.readyState = "closed";
this.emit("close", t);
this._reconnection && !this.skipReconnect && this.reconnect();
};
h.prototype.reconnect = function() {
if (this.reconnecting || this.skipReconnect) return this;
var t = this;
if (this.backoff.attempts >= this._reconnectionAttempts) {
c("reconnect failed");
this.backoff.reset();
this.emitAll("reconnect_failed");
this.reconnecting = !1;
} else {
var e = this.backoff.duration();
c("will wait %dms before reconnect attempt", e);
this.reconnecting = !0;
var n = setTimeout(function() {
if (!t.skipReconnect) {
c("attempting reconnect");
t.emitAll("reconnect_attempt", t.backoff.attempts);
t.emitAll("reconnecting", t.backoff.attempts);
t.skipReconnect || t.open(function(e) {
if (e) {
c("reconnect attempt error");
t.reconnecting = !1;
t.reconnect();
t.emitAll("reconnect_error", e.data);
} else {
c("reconnect success");
t.onreconnect();
}
});
}
}, e);
this.subs.push({
destroy: function() {
clearTimeout(n);
}
});
}
};
h.prototype.onreconnect = function() {
var t = this.backoff.attempts;
this.reconnecting = !1;
this.backoff.reset();
this.updateSocketIds();
this.emitAll("reconnect", t);
};
}, {
"./on": 33,
"./socket": 34,
backo2: 36,
"component-bind": 37,
"component-emitter": 38,
debug: 39,
"engine.io-client": 1,
indexof: 42,
"socket.io-parser": 47
} ],
33: [ function(t, e) {
e.exports = function(t, e, n) {
t.on(e, n);
return {
destroy: function() {
t.removeListener(e, n);
}
};
};
}, {} ],
34: [ function(t, e) {
var n = t("socket.io-parser"), r = t("component-emitter"), o = t("to-array"), i = t("./on"), s = t("component-bind"), a = t("debug")("socket.io-client:socket"), c = t("has-binary");
e.exports = u;
var p = {
connect: 1,
connect_error: 1,
connect_timeout: 1,
connecting: 1,
disconnect: 1,
error: 1,
reconnect: 1,
reconnect_attempt: 1,
reconnect_failed: 1,
reconnect_error: 1,
reconnecting: 1,
ping: 1,
pong: 1
}, f = r.prototype.emit;
function u(t, e) {
this.io = t;
this.nsp = e;
this.json = this;
this.ids = 0;
this.acks = {};
this.receiveBuffer = [];
this.sendBuffer = [];
this.connected = !1;
this.disconnected = !0;
this.io.autoConnect && this.open();
}
r(u.prototype);
u.prototype.subEvents = function() {
if (!this.subs) {
var t = this.io;
this.subs = [ i(t, "open", s(this, "onopen")), i(t, "packet", s(this, "onpacket")), i(t, "close", s(this, "onclose")) ];
}
};
u.prototype.open = u.prototype.connect = function() {
if (this.connected) return this;
this.subEvents();
this.io.open();
"open" == this.io.readyState && this.onopen();
this.emit("connecting");
return this;
};
u.prototype.send = function() {
var t = o(arguments);
t.unshift("message");
this.emit.apply(this, t);
return this;
};
u.prototype.emit = function(t) {
if (p.hasOwnProperty(t)) {
f.apply(this, arguments);
return this;
}
var e = o(arguments), r = n.EVENT;
c(e) && (r = n.BINARY_EVENT);
var i = {
type: r,
data: e,
options: {}
};
i.options.compress = !this.flags || !1 !== this.flags.compress;
if ("function" == typeof e[e.length - 1]) {
a("emitting packet with ack id %d", this.ids);
this.acks[this.ids] = e.pop();
i.id = this.ids++;
}
this.connected ? this.packet(i) : this.sendBuffer.push(i);
delete this.flags;
return this;
};
u.prototype.packet = function(t) {
t.nsp = this.nsp;
this.io.packet(t);
};
u.prototype.onopen = function() {
a("transport is open - connecting");
"/" != this.nsp && this.packet({
type: n.CONNECT
});
};
u.prototype.onclose = function(t) {
a("close (%s)", t);
this.connected = !1;
this.disconnected = !0;
delete this.id;
this.emit("disconnect", t);
};
u.prototype.onpacket = function(t) {
if (t.nsp == this.nsp) switch (t.type) {
case n.CONNECT:
this.onconnect();
break;

case n.EVENT:
case n.BINARY_EVENT:
this.onevent(t);
break;

case n.ACK:
case n.BINARY_ACK:
this.onack(t);
break;

case n.DISCONNECT:
this.ondisconnect();
break;

case n.ERROR:
this.emit("error", t.data);
}
};
u.prototype.onevent = function(t) {
var e = t.data || [];
a("emitting event %j", e);
if (null != t.id) {
a("attaching ack callback to event");
e.push(this.ack(t.id));
}
this.connected ? f.apply(this, e) : this.receiveBuffer.push(e);
};
u.prototype.ack = function(t) {
var e = this, r = !1;
return function() {
if (!r) {
r = !0;
var i = o(arguments);
a("sending ack %j", i);
var s = c(i) ? n.BINARY_ACK : n.ACK;
e.packet({
type: s,
id: t,
data: i
});
}
};
};
u.prototype.onack = function(t) {
var e = this.acks[t.id];
if ("function" == typeof e) {
a("calling ack %s with %j", t.id, t.data);
e.apply(this, t.data);
delete this.acks[t.id];
} else a("bad ack %s", t.id);
};
u.prototype.onconnect = function() {
this.connected = !0;
this.disconnected = !1;
this.emit("connect");
this.emitBuffered();
};
u.prototype.emitBuffered = function() {
var t;
for (t = 0; t < this.receiveBuffer.length; t++) f.apply(this, this.receiveBuffer[t]);
this.receiveBuffer = [];
for (t = 0; t < this.sendBuffer.length; t++) this.packet(this.sendBuffer[t]);
this.sendBuffer = [];
};
u.prototype.ondisconnect = function() {
a("server disconnect (%s)", this.nsp);
this.destroy();
this.onclose("io server disconnect");
};
u.prototype.destroy = function() {
if (this.subs) {
for (var t = 0; t < this.subs.length; t++) this.subs[t].destroy();
this.subs = null;
}
this.io.destroy(this);
};
u.prototype.close = u.prototype.disconnect = function() {
if (this.connected) {
a("performing disconnect (%s)", this.nsp);
this.packet({
type: n.DISCONNECT
});
}
this.destroy();
this.connected && this.onclose("io client disconnect");
return this;
};
u.prototype.compress = function(t) {
this.flags = this.flags || {};
this.flags.compress = t;
return this;
};
}, {
"./on": 33,
"component-bind": 37,
"component-emitter": 38,
debug: 39,
"has-binary": 41,
"socket.io-parser": 47,
"to-array": 51
} ],
35: [ function(t, e) {
(function(n) {
var r = t("parseuri"), o = t("debug")("socket.io-client:url");
e.exports = function(t, e) {
var i = t;
e = e || n.location;
null == t && (t = e.protocol + "//" + e.host);
if ("string" == typeof t) {
"/" == t.charAt(0) && (t = "/" == t.charAt(1) ? e.protocol + t : e.host + t);
if (!/^(https?|wss?):\/\//.test(t)) {
o("protocol-less url %s", t);
t = "undefined" != typeof e ? e.protocol + "//" + t : "https://" + t;
}
o("parse %s", t);
i = r(t);
}
i.port || (/^(http|ws)$/.test(i.protocol) ? i.port = "80" : /^(http|ws)s$/.test(i.protocol) && (i.port = "443"));
i.path = i.path || "/";
var s = -1 !== i.host.indexOf(":") ? "[" + i.host + "]" : i.host;
i.id = i.protocol + "://" + s + ":" + i.port;
i.href = i.protocol + "://" + s + (e && e.port == i.port ? "" : ":" + i.port);
return i;
};
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {
debug: 39,
parseuri: 45
} ],
36: [ function(t, e) {
e.exports = n;
function n(t) {
t = t || {};
this.ms = t.min || 100;
this.max = t.max || 1e4;
this.factor = t.factor || 2;
this.jitter = t.jitter > 0 && t.jitter <= 1 ? t.jitter : 0;
this.attempts = 0;
}
n.prototype.duration = function() {
var t = this.ms * Math.pow(this.factor, this.attempts++);
if (this.jitter) {
var e = Math.random(), n = Math.floor(e * this.jitter * t);
t = 0 == (1 & Math.floor(10 * e)) ? t - n : t + n;
}
return 0 | Math.min(t, this.max);
};
n.prototype.reset = function() {
this.attempts = 0;
};
n.prototype.setMin = function(t) {
this.ms = t;
};
n.prototype.setMax = function(t) {
this.max = t;
};
n.prototype.setJitter = function(t) {
this.jitter = t;
};
}, {} ],
37: [ function(t, e) {
var n = [].slice;
e.exports = function(t, e) {
"string" == typeof e && (e = t[e]);
if ("function" != typeof e) throw new Error("bind() requires a function");
var r = n.call(arguments, 2);
return function() {
return e.apply(t, r.concat(n.call(arguments)));
};
};
}, {} ],
38: [ function(t, e) {
e.exports = n;
function n(t) {
if (t) return r(t);
}
function r(t) {
for (var e in n.prototype) t[e] = n.prototype[e];
return t;
}
n.prototype.on = n.prototype.addEventListener = function(t, e) {
this._callbacks = this._callbacks || {};
(this._callbacks["$" + t] = this._callbacks["$" + t] || []).push(e);
return this;
};
n.prototype.once = function(t, e) {
function n() {
this.off(t, n);
e.apply(this, arguments);
}
n.fn = e;
this.on(t, n);
return this;
};
n.prototype.off = n.prototype.removeListener = n.prototype.removeAllListeners = n.prototype.removeEventListener = function(t, e) {
this._callbacks = this._callbacks || {};
if (0 == arguments.length) {
this._callbacks = {};
return this;
}
var n, r = this._callbacks["$" + t];
if (!r) return this;
if (1 == arguments.length) {
delete this._callbacks["$" + t];
return this;
}
for (var o = 0; o < r.length; o++) if ((n = r[o]) === e || n.fn === e) {
r.splice(o, 1);
break;
}
return this;
};
n.prototype.emit = function(t) {
this._callbacks = this._callbacks || {};
var e = [].slice.call(arguments, 1), n = this._callbacks["$" + t];
if (n) for (var r = 0, o = (n = n.slice(0)).length; r < o; ++r) n[r].apply(this, e);
return this;
};
n.prototype.listeners = function(t) {
this._callbacks = this._callbacks || {};
return this._callbacks["$" + t] || [];
};
n.prototype.hasListeners = function(t) {
return !!this.listeners(t).length;
};
}, {} ],
39: [ function(t, e, n) {
arguments[4][17][0].apply(n, arguments);
}, {
"./debug": 40,
dup: 17
} ],
40: [ function(t, e, n) {
arguments[4][18][0].apply(n, arguments);
}, {
dup: 18,
ms: 44
} ],
41: [ function(t, e) {
(function(n) {
var r = t("isarray");
e.exports = function(t) {
return function t(e) {
if (!e) return !1;
if (n.Buffer && n.Buffer.isBuffer && n.Buffer.isBuffer(e) || n.ArrayBuffer && e instanceof ArrayBuffer || n.Blob && e instanceof Blob || n.File && e instanceof File) return !0;
if (r(e)) {
for (var o = 0; o < e.length; o++) if (t(e[o])) return !0;
} else if (e && "object" == typeof e) {
e.toJSON && "function" == typeof e.toJSON && (e = e.toJSON());
for (var i in e) if (Object.prototype.hasOwnProperty.call(e, i) && t(e[i])) return !0;
}
return !1;
}(t);
};
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {
isarray: 43
} ],
42: [ function(t, e, n) {
arguments[4][23][0].apply(n, arguments);
}, {
dup: 23
} ],
43: [ function(t, e, n) {
arguments[4][24][0].apply(n, arguments);
}, {
dup: 24
} ],
44: [ function(t, e, n) {
arguments[4][25][0].apply(n, arguments);
}, {
dup: 25
} ],
45: [ function(t, e, n) {
arguments[4][28][0].apply(n, arguments);
}, {
dup: 28
} ],
46: [ function(t, e, n) {
(function(e) {
var r = t("isarray"), o = t("./is-buffer");
n.deconstructPacket = function(t) {
var e = [], n = t.data, i = t;
i.data = function t(n) {
if (!n) return n;
if (o(n)) {
var i = {
_placeholder: !0,
num: e.length
};
e.push(n);
return i;
}
if (r(n)) {
for (var s = new Array(n.length), a = 0; a < n.length; a++) s[a] = t(n[a]);
return s;
}
if ("object" == typeof n && !(n instanceof Date)) {
s = {};
for (var c in n) s[c] = t(n[c]);
return s;
}
return n;
}(n);
i.attachments = e.length;
return {
packet: i,
buffers: e
};
};
n.reconstructPacket = function(t, e) {
t.data = function t(n) {
if (n && n._placeholder) return e[n.num];
if (r(n)) {
for (var o = 0; o < n.length; o++) n[o] = t(n[o]);
return n;
}
if (n && "object" == typeof n) {
for (var i in n) n[i] = t(n[i]);
return n;
}
return n;
}(t.data);
t.attachments = void 0;
return t;
};
n.removeBlobs = function(t, n) {
var i = 0, s = t;
(function t(a, c, p) {
if (!a) return a;
if (e.Blob && a instanceof Blob || e.File && a instanceof File) {
i++;
var f = new FileReader();
f.onload = function() {
p ? p[c] = this.result : s = this.result;
--i || n(s);
};
f.readAsArrayBuffer(a);
} else if (r(a)) for (var u = 0; u < a.length; u++) t(a[u], u, a); else if (a && "object" == typeof a && !o(a)) for (var h in a) t(a[h], h, a);
})(s);
i || n(s);
};
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {
"./is-buffer": 48,
isarray: 43
} ],
47: [ function(t, e, n) {
var r = t("debug")("socket.io-parser"), o = t("json3"), i = (t("isarray"), t("component-emitter")), s = t("./binary"), a = t("./is-buffer");
n.protocol = 4;
n.types = [ "CONNECT", "DISCONNECT", "EVENT", "BINARY_EVENT", "ACK", "BINARY_ACK", "ERROR" ];
n.CONNECT = 0;
n.DISCONNECT = 1;
n.EVENT = 2;
n.ACK = 3;
n.ERROR = 4;
n.BINARY_EVENT = 5;
n.BINARY_ACK = 6;
n.Encoder = c;
n.Decoder = u;
function c() {}
c.prototype.encode = function(t, e) {
r("encoding packet %j", t);
n.BINARY_EVENT == t.type || n.BINARY_ACK == t.type ? f(t, e) : e([ p(t) ]);
};
function p(t) {
var e = "", i = !1;
e += t.type;
if (n.BINARY_EVENT == t.type || n.BINARY_ACK == t.type) {
e += t.attachments;
e += "-";
}
if (t.nsp && "/" != t.nsp) {
i = !0;
e += t.nsp;
}
if (null != t.id) {
if (i) {
e += ",";
i = !1;
}
e += t.id;
}
if (null != t.data) {
i && (e += ",");
e += o.stringify(t.data);
}
r("encoded %j as %s", t, e);
return e;
}
function f(t, e) {
s.removeBlobs(t, function(t) {
var n = s.deconstructPacket(t), r = p(n.packet), o = n.buffers;
o.unshift(r);
e(o);
});
}
function u() {
this.reconstructor = null;
}
i(u.prototype);
u.prototype.add = function(t) {
var e;
if ("string" == typeof t) {
e = h(t);
if (n.BINARY_EVENT == e.type || n.BINARY_ACK == e.type) {
this.reconstructor = new l(e);
0 === this.reconstructor.reconPack.attachments && this.emit("decoded", e);
} else this.emit("decoded", e);
} else {
if (!a(t) && !t.base64) throw new Error("Unknown type: " + t);
if (!this.reconstructor) throw new Error("got binary data when not reconstructing a packet");
if (e = this.reconstructor.takeBinaryData(t)) {
this.reconstructor = null;
this.emit("decoded", e);
}
}
};
function h(t) {
var e = {}, i = 0;
e.type = Number(t.charAt(0));
if (null == n.types[e.type]) return d();
if (n.BINARY_EVENT == e.type || n.BINARY_ACK == e.type) {
for (var s = ""; "-" != t.charAt(++i); ) {
s += t.charAt(i);
if (i == t.length) break;
}
if (s != Number(s) || "-" != t.charAt(i)) throw new Error("Illegal attachments");
e.attachments = Number(s);
}
if ("/" == t.charAt(i + 1)) {
e.nsp = "";
for (;++i && "," != (c = t.charAt(i)); ) {
e.nsp += c;
if (i == t.length) break;
}
} else e.nsp = "/";
var a = t.charAt(i + 1);
if ("" !== a && Number(a) == a) {
e.id = "";
for (;++i; ) {
var c;
if (null == (c = t.charAt(i)) || Number(c) != c) {
--i;
break;
}
e.id += t.charAt(i);
if (i == t.length) break;
}
e.id = Number(e.id);
}
if (t.charAt(++i)) try {
e.data = o.parse(t.substr(i));
} catch (t) {
return d();
}
r("decoded %s as %j", t, e);
return e;
}
u.prototype.destroy = function() {
this.reconstructor && this.reconstructor.finishedReconstruction();
};
function l(t) {
this.reconPack = t;
this.buffers = [];
}
l.prototype.takeBinaryData = function(t) {
this.buffers.push(t);
if (this.buffers.length == this.reconPack.attachments) {
var e = s.reconstructPacket(this.reconPack, this.buffers);
this.finishedReconstruction();
return e;
}
return null;
};
l.prototype.finishedReconstruction = function() {
this.reconPack = null;
this.buffers = [];
};
function d() {
return {
type: n.ERROR,
data: "parser error"
};
}
}, {
"./binary": 46,
"./is-buffer": 48,
"component-emitter": 49,
debug: 39,
isarray: 43,
json3: 50
} ],
48: [ function(t, e) {
(function(t) {
e.exports = function(e) {
return t.Buffer && t.Buffer.isBuffer(e) || t.ArrayBuffer && e instanceof ArrayBuffer;
};
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {} ],
49: [ function(t, e, n) {
arguments[4][15][0].apply(n, arguments);
}, {
dup: 15
} ],
50: [ function(t, e, n) {
(function(t) {
(function() {
var r = {
function: !0,
object: !0
}, o = r[typeof n] && n && !n.nodeType && n, i = r[typeof window] && window || this, s = o && r[typeof e] && e && !e.nodeType && "object" == typeof t && t;
!s || s.global !== s && s.window !== s && s.self !== s || (i = s);
function a(t, e) {
t || (t = i.Object());
e || (e = i.Object());
var n = t.Number || i.Number, o = t.String || i.String, s = t.Object || i.Object, c = t.Date || i.Date, p = t.SyntaxError || i.SyntaxError, f = t.TypeError || i.TypeError, u = t.Math || i.Math, h = t.JSON || i.JSON;
if ("object" == typeof h && h) {
e.stringify = h.stringify;
e.parse = h.parse;
}
var l, d, y, g = s.prototype, m = g.toString, b = new c(-0xc782b5b800cec);
try {
b = -109252 == b.getUTCFullYear() && 0 === b.getUTCMonth() && 1 === b.getUTCDate() && 10 == b.getUTCHours() && 37 == b.getUTCMinutes() && 6 == b.getUTCSeconds() && 708 == b.getUTCMilliseconds();
} catch (t) {}
function v(t) {
if (v[t] !== y) return v[t];
var r;
if ("bug-string-char-index" == t) r = "a" != "a"[0]; else if ("json" == t) r = v("json-stringify") && v("json-parse"); else {
var i, s = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
if ("json-stringify" == t) {
var a = e.stringify, p = "function" == typeof a && b;
if (p) {
(i = function() {
return 1;
}).toJSON = i;
try {
p = "0" === a(0) && "0" === a(new n()) && '""' == a(new o()) && a(m) === y && a(y) === y && a() === y && "1" === a(i) && "[1]" == a([ i ]) && "[null]" == a([ y ]) && "null" == a(null) && "[null,null,null]" == a([ y, m, null ]) && a({
a: [ i, !0, !1, null, "\0\b\n\f\r\t" ]
}) == s && "1" === a(null, i) && "[\n 1,\n 2\n]" == a([ 1, 2 ], null, 1) && '"-271821-04-20T00:00:00.000Z"' == a(new c(-864e13)) && '"+275760-09-13T00:00:00.000Z"' == a(new c(864e13)) && '"-000001-01-01T00:00:00.000Z"' == a(new c(-621987552e5)) && '"1969-12-31T23:59:59.999Z"' == a(new c(-1));
} catch (t) {
p = !1;
}
}
r = p;
}
if ("json-parse" == t) {
var f = e.parse;
if ("function" == typeof f) try {
if (0 === f("0") && !f(!1)) {
var u = 5 == (i = f(s)).a.length && 1 === i.a[0];
if (u) {
try {
u = !f('"\t"');
} catch (t) {}
if (u) try {
u = 1 !== f("01");
} catch (t) {}
if (u) try {
u = 1 !== f("1.");
} catch (t) {}
}
}
} catch (t) {
u = !1;
}
r = u;
}
}
return v[t] = !!r;
}
if (!v("json")) {
var w = v("bug-string-char-index");
if (!b) var k = u.floor, x = [ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 ], A = function(t, e) {
return x[e] + 365 * (t - 1970) + k((t - 1969 + (e = +(e > 1))) / 4) - k((t - 1901 + e) / 100) + k((t - 1601 + e) / 400);
};
(l = g.hasOwnProperty) || (l = function(t) {
var e, n = {};
if ((n.__proto__ = null, n.__proto__ = {
toString: 1
}, n).toString != m) l = function(t) {
var e = this.__proto__, n = t in (this.__proto__ = null, this);
this.__proto__ = e;
return n;
}; else {
e = n.constructor;
l = function(t) {
var n = (this.constructor || e).prototype;
return t in this && !(t in n && this[t] === n[t]);
};
}
n = null;
return l.call(this, t);
});
d = function(t, e) {
var n, o, i, s = 0;
(n = function() {
this.valueOf = 0;
}).prototype.valueOf = 0;
o = new n();
for (i in o) l.call(o, i) && s++;
n = o = null;
if (s) d = 2 == s ? function(t, e) {
var n, r = {}, o = "[object Function]" == m.call(t);
for (n in t) o && "prototype" == n || l.call(r, n) || !(r[n] = 1) || !l.call(t, n) || e(n);
} : function(t, e) {
var n, r, o = "[object Function]" == m.call(t);
for (n in t) o && "prototype" == n || !l.call(t, n) || (r = "constructor" === n) || e(n);
(r || l.call(t, n = "constructor")) && e(n);
}; else {
o = [ "valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor" ];
d = function(t, e) {
var n, i, s = "[object Function]" == m.call(t), a = !s && "function" != typeof t.constructor && r[typeof t.hasOwnProperty] && t.hasOwnProperty || l;
for (n in t) s && "prototype" == n || !a.call(t, n) || e(n);
for (i = o.length; n = o[--i]; a.call(t, n) && e(n)) ;
};
}
return d(t, e);
};
if (!v("json-stringify")) {
var B = {
92: "\\\\",
34: '\\"',
8: "\\b",
12: "\\f",
10: "\\n",
13: "\\r",
9: "\\t"
}, C = function(t, e) {
return ("000000" + (e || 0)).slice(-t);
}, S = function(t) {
for (var e = '"', n = 0, r = t.length, o = !w || r > 10, i = o && (w ? t.split("") : t); n < r; n++) {
var s = t.charCodeAt(n);
switch (s) {
case 8:
case 9:
case 10:
case 12:
case 13:
case 34:
case 92:
e += B[s];
break;

default:
if (s < 32) {
e += "\\u00" + C(2, s.toString(16));
break;
}
e += o ? i[n] : t.charAt(n);
}
}
return e + '"';
}, E = function(t, e, n, r, o, i, s) {
var a, c, p, u, h, g, b, v, w, x, B, j, _, T, O, N;
try {
a = e[t];
} catch (t) {}
if ("object" == typeof a && a) if ("[object Date]" != (c = m.call(a)) || l.call(a, "toJSON")) "function" == typeof a.toJSON && ("[object Number]" != c && "[object String]" != c && "[object Array]" != c || l.call(a, "toJSON")) && (a = a.toJSON(t)); else if (a > -1 / 0 && a < 1 / 0) {
if (A) {
h = k(a / 864e5);
for (p = k(h / 365.2425) + 1970 - 1; A(p + 1, 0) <= h; p++) ;
for (u = k((h - A(p, 0)) / 30.42); A(p, u + 1) <= h; u++) ;
h = 1 + h - A(p, u);
b = k((g = (a % 864e5 + 864e5) % 864e5) / 36e5) % 24;
v = k(g / 6e4) % 60;
w = k(g / 1e3) % 60;
x = g % 1e3;
} else {
p = a.getUTCFullYear();
u = a.getUTCMonth();
h = a.getUTCDate();
b = a.getUTCHours();
v = a.getUTCMinutes();
w = a.getUTCSeconds();
x = a.getUTCMilliseconds();
}
a = (p <= 0 || p >= 1e4 ? (p < 0 ? "-" : "+") + C(6, p < 0 ? -p : p) : C(4, p)) + "-" + C(2, u + 1) + "-" + C(2, h) + "T" + C(2, b) + ":" + C(2, v) + ":" + C(2, w) + "." + C(3, x) + "Z";
} else a = null;
n && (a = n.call(e, t, a));
if (null === a) return "null";
if ("[object Boolean]" == (c = m.call(a))) return "" + a;
if ("[object Number]" == c) return a > -1 / 0 && a < 1 / 0 ? "" + a : "null";
if ("[object String]" == c) return S("" + a);
if ("object" == typeof a) {
for (T = s.length; T--; ) if (s[T] === a) throw f();
s.push(a);
B = [];
O = i;
i += o;
if ("[object Array]" == c) {
for (_ = 0, T = a.length; _ < T; _++) {
j = E(_, a, n, r, o, i, s);
B.push(j === y ? "null" : j);
}
N = B.length ? o ? "[\n" + i + B.join(",\n" + i) + "\n" + O + "]" : "[" + B.join(",") + "]" : "[]";
} else {
d(r || a, function(t) {
var e = E(t, a, n, r, o, i, s);
e !== y && B.push(S(t) + ":" + (o ? " " : "") + e);
});
N = B.length ? o ? "{\n" + i + B.join(",\n" + i) + "\n" + O + "}" : "{" + B.join(",") + "}" : "{}";
}
s.pop();
return N;
}
};
e.stringify = function(t, e, n) {
var o, i, s, a;
if (r[typeof e] && e) if ("[object Function]" == (a = m.call(e))) i = e; else if ("[object Array]" == a) {
s = {};
for (var c, p = 0, f = e.length; p < f; c = e[p++], ("[object String]" == (a = m.call(c)) || "[object Number]" == a) && (s[c] = 1)) ;
}
if (n) if ("[object Number]" == (a = m.call(n))) {
if ((n -= n % 1) > 0) for (o = "", n > 10 && (n = 10); o.length < n; o += " ") ;
} else "[object String]" == a && (o = n.length <= 10 ? n : n.slice(0, 10));
return E("", ((c = {})[""] = t, c), i, s, o, "", []);
};
}
if (!v("json-parse")) {
var j, _, T = o.fromCharCode, O = {
92: "\\",
34: '"',
47: "/",
98: "\b",
116: "\t",
110: "\n",
102: "\f",
114: "\r"
}, N = function() {
j = _ = null;
throw p();
}, P = function() {
for (var t, e, n, r, o, i = _, s = i.length; j < s; ) switch (o = i.charCodeAt(j)) {
case 9:
case 10:
case 13:
case 32:
j++;
break;

case 123:
case 125:
case 91:
case 93:
case 58:
case 44:
t = w ? i.charAt(j) : i[j];
j++;
return t;

case 34:
for (t = "@", j++; j < s; ) if ((o = i.charCodeAt(j)) < 32) N(); else if (92 == o) switch (o = i.charCodeAt(++j)) {
case 92:
case 34:
case 47:
case 98:
case 116:
case 110:
case 102:
case 114:
t += O[o];
j++;
break;

case 117:
e = ++j;
for (n = j + 4; j < n; j++) (o = i.charCodeAt(j)) >= 48 && o <= 57 || o >= 97 && o <= 102 || o >= 65 && o <= 70 || N();
t += T("0x" + i.slice(e, j));
break;

default:
N();
} else {
if (34 == o) break;
o = i.charCodeAt(j);
e = j;
for (;o >= 32 && 92 != o && 34 != o; ) o = i.charCodeAt(++j);
t += i.slice(e, j);
}
if (34 == i.charCodeAt(j)) {
j++;
return t;
}
N();

default:
e = j;
if (45 == o) {
r = !0;
o = i.charCodeAt(++j);
}
if (o >= 48 && o <= 57) {
48 == o && (o = i.charCodeAt(j + 1)) >= 48 && o <= 57 && N();
r = !1;
for (;j < s && (o = i.charCodeAt(j)) >= 48 && o <= 57; j++) ;
if (46 == i.charCodeAt(j)) {
n = ++j;
for (;n < s && (o = i.charCodeAt(n)) >= 48 && o <= 57; n++) ;
n == j && N();
j = n;
}
if (101 == (o = i.charCodeAt(j)) || 69 == o) {
43 != (o = i.charCodeAt(++j)) && 45 != o || j++;
for (n = j; n < s && (o = i.charCodeAt(n)) >= 48 && o <= 57; n++) ;
n == j && N();
j = n;
}
return +i.slice(e, j);
}
r && N();
if ("true" == i.slice(j, j + 4)) {
j += 4;
return !0;
}
if ("false" == i.slice(j, j + 5)) {
j += 5;
return !1;
}
if ("null" == i.slice(j, j + 4)) {
j += 4;
return null;
}
N();
}
return "$";
}, R = function(t) {
var e, n;
"$" == t && N();
if ("string" == typeof t) {
if ("@" == (w ? t.charAt(0) : t[0])) return t.slice(1);
if ("[" == t) {
e = [];
for (;"]" != (t = P()); n || (n = !0)) {
n && ("," == t ? "]" == (t = P()) && N() : N());
"," == t && N();
e.push(R(t));
}
return e;
}
if ("{" == t) {
e = {};
for (;"}" != (t = P()); n || (n = !0)) {
n && ("," == t ? "}" == (t = P()) && N() : N());
"," != t && "string" == typeof t && "@" == (w ? t.charAt(0) : t[0]) && ":" == P() || N();
e[t.slice(1)] = R(P());
}
return e;
}
N();
}
return t;
}, D = function(t, e, n) {
var r = U(t, e, n);
r === y ? delete t[e] : t[e] = r;
}, U = function(t, e, n) {
var r, o = t[e];
if ("object" == typeof o && o) if ("[object Array]" == m.call(o)) for (r = o.length; r--; ) D(o, r, n); else d(o, function(t) {
D(o, t, n);
});
return n.call(t, e, o);
};
e.parse = function(t, e) {
var n, r;
j = 0;
_ = "" + t;
n = R(P());
"$" != P() && N();
j = _ = null;
return e && "[object Function]" == m.call(e) ? U(((r = {})[""] = n, r), "", e) : n;
};
}
}
e.runInContext = a;
return e;
}
if (o) a(i, o); else {
var c = i.JSON, p = i.JSON3, f = !1, u = a(i, i.JSON3 = {
noConflict: function() {
if (!f) {
f = !0;
i.JSON = c;
i.JSON3 = p;
c = p = null;
}
return u;
}
});
i.JSON = {
parse: u.parse,
stringify: u.stringify
};
}
}).call(this);
}).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {});
}, {} ],
51: [ function(t, e) {
e.exports = function(t, e) {
for (var n = [], r = (e = e || 0) || 0; r < t.length; r++) n[r - e] = t[r];
return n;
};
}, {} ]
}, {}, [ 31 ])(31);
});